dockerd: add docker-storage to init
authorKeith T. Garner <[email protected]>
Wed, 12 Mar 2025 19:57:48 +0000 (14:57 -0500)
committerTianling Shen <[email protected]>
Thu, 13 Mar 2025 16:51:21 +0000 (00:51 +0800)
Docker's backend storage driver can be configurable for certain
filesystems. The default is the overlay storage driver, but if you run
openwrt on a system with btrfs, this will allow you to override the
default configuration by settings the storage_driver in uci in dockerd's
global section. This value will be used in the created dockerd.json
file.

Signed-off-by: Keith T. Garner <[email protected]>
utils/dockerd/Makefile
utils/dockerd/files/dockerd.init

index 0068fa11d71d93aac7e93699ef3a0203ca25b9eb..cbfbfdde56ebeaa1a24fefa4c9f6967a54ef1675 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dockerd
 PKG_VERSION:=27.3.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
index 51889370cab1be9bcf53060554c4aeb9841942f4..8835a6d5f52a4a2d4ecad4222eadf2a98836afa4 100755 (executable)
@@ -189,6 +189,7 @@ process_config() {
        config_get http_proxy proxies http_proxy "${http_proxy}"
        config_get https_proxy proxies https_proxy "${https_proxy}"
        config_get no_proxy proxies no_proxy "${no_proxy}"
+       config_get storage_driver globals storage_driver ""
 
        . /usr/share/libubox/jshn.sh
        json_init
@@ -218,6 +219,7 @@ process_config() {
                [ -z "${no_proxy}" ] || json_add_string "no-proxy" "${no_proxy}"
                json_close_object
        fi
+       [ -z "${storage_driver}" ] || json_add_string "storage-driver" "${storage_driver}"
        json_dump > "${DOCKERD_CONF}"
 
        [ "${iptables}" -eq "1" ] && config_foreach iptables_add_blocking_rule firewall